
<%@page import="sopt.issueChaser.MetawebblogHelper"%>
<%@page import="comm.util.RequestManager"%>
<%@page import="comm.util.SoptHashMap"%><%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%
	SoptHashMap hm = RequestManager.getRequest(request);

	System.out.println(hm.toString());
	
	MetawebblogHelper blog = new MetawebblogHelper(session.getAttribute("BLOGAPIADDRESS").toString());
	//String result = hm.get("CONTENT").toString();
	String result = blog.newPost(session.getAttribute("BLOGID").toString(),
			session.getAttribute("CURRENT_USER").toString(),
			session.getAttribute("USERPW").toString(),
			hm.get("TX_ARTICLE_TITLE").toString(),
			hm.get("TX_CONTENT").toString(),
			hm.get("TX_ARTICLE_CATEGORY").toString(),
			hm.get("TX_TAGS").toString()
			);
%>
<%if(result!=null && result.length()>3){%>
	<script type="text/javascript">
		alert('성공적으로 블로그에 포스팅 되었습니다:)');
		location.href = "./";
	</script>
<%}%>